﻿<%@ Page Language="C#" MasterPageFile="~/IPMSMasterPage.master" AutoEventWireup="true" CodeFile="SysUserGroups.aspx.cs" Inherits="SysUserGroups" Title="Project Monitoring System" Culture="Auto:en-US" UICulture="auto" meta:resourcekey="PageResource1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server" Visible="false"/>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server" >
	<div style="margin-left:10px;margin-right:10px;">
		<asp:Panel ID="panelSearch"  runat="server">
			<fieldset>
				<legend>
					<asp:Label ID="lblSearch" runat="server" Text="Search" meta:resourcekey="lblSearchResource1"></asp:Label>
				</legend>
				<table>
					<tr>
						<td width="100" align="right">
							<asp:Label ID="lblSearchGroupName" runat="server" Text="Group Name" meta:resourcekey="lblSearchGroupNameResource1"/>
						</td>
						<td width="200" align="left">
							<asp:TextBox ID="txtSearchGroupName" runat="server"/>
						</td>
						<td align="right">
							<asp:Button ID="btnSearch" runat="server" Text="Search" CausesValidation="false" CssClass="submit" meta:resourcekey="btnSearchResource1" onclick="OnClick"/>
							<asp:Button ID="btnNew" runat="server" CausesValidation="False" CssClass="submit" Text="New User Group" meta:resourcekey="btnNewResource1" onclick="OnClick" />
						</td>
					</tr>
				</table>
			</fieldset>
		</asp:Panel>
		<table>
			<tr>
				<td align="center"><asp:Label ID="lblError" runat="server" ForeColor="Red" CssClass="error"/></td>
			</tr>
		</table>
		<asp:Panel ID="panelGroupList" runat="server">
			<fieldset>
				<legend>
					<asp:Label ID="lblActive" runat="server" Text="User Groups List" meta:resourcekey="lblActiveResource1"/>
				</legend>
				<table>
					<tr>
						<td>
							<asp:GridView CssClass="Grid" ID="gvUserGroupList" runat="server" 
									BackColor="#DEBA84" 
									BorderColor="#660000"
									BorderStyle="Solid" 
									BorderWidth="1px" 
									CellPadding="0" 
									CellSpacing="0" 
									Width="100%"
									Height="1%" 
									AllowSorting="True" 
									EmptyDataText="No User Group record(s) available."
									AutoGenerateColumns="False" 
									DataKeyNames="Rowno, GroupName" 
									OnRowDataBound="OnRowDataBound"
									OnRowCommand="OnRowCommand">
								<Columns>
									<asp:BoundField DataField="GroupName" HeaderText="Group Name" HeaderStyle-Width="100" ItemStyle-HorizontalAlign="left" ItemStyle-Wrap="false" meta:resourcekey="BoundFieldResource1"/>
									<asp:BoundField DataField="Remark" HeaderText="Remark" HeaderStyle-Width="300" ItemStyle-HorizontalAlign="left" ItemStyle-Wrap="false" meta:resourcekey="BoundFieldResource2"/>
									<asp:BoundField DataField="UpdateIP" HeaderText="IP Address" ItemStyle-HorizontalAlign="left" HeaderStyle-Width="100" meta:resourcekey="BoundFieldResource3"/>
									<asp:BoundField DataField="UpdateBy" HeaderText="Updated By" ItemStyle-HorizontalAlign="left" HeaderStyle-Width="100" meta:resourcekey="BoundFieldResource4"/>
									<asp:BoundField DataField="UpdateDate" HeaderText="Last Update Date" HeaderStyle-Width="200" ItemStyle-HorizontalAlign="left" meta:resourcekey="BoundFieldResource5"/>
									<asp:TemplateField ItemStyle-Width="60" ItemStyle-HorizontalAlign="center">
										<ItemTemplate>
											<asp:Label ID="lblGroupType" Text='<%# Eval("GroupType") %>' Visible="false" runat="server"/>
											<asp:ImageButton ID="btnEdit" CommandName="Edit" ImageUrl="Images/icon-edit.gif" runat="server"/>
											<asp:ImageButton ID="btnTrash" CommandName="Trash" ImageUrl="Images/icon-trash.gif" runat="server"/>
										</ItemTemplate>
									</asp:TemplateField>
								</Columns>
								<HeaderStyle CssClass="GridHeaderStyle"/>
								<RowStyle CssClass="GridRowStyle" />
								<AlternatingRowStyle CssClass="GridAltRowStyle" />
								<SelectedRowStyle CssClass="GridSelectedRowStyle" />
								<PagerStyle CssClass="GridPagerStyle" ForeColor="White" />
								<FooterStyle CssClass="GridFooterStyle" />
							</asp:GridView>        
						</td>
					</tr>
				</table>
			</fieldset>
		</asp:Panel>
	</div>
</asp:Content>
